#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>
#include <assert.h>

void* My_memcpy(void* dest, void* sur, size_t num)
{
	assert(dest && sur);
	while (num--)
	{
		*(char*)dest = *(char*)sur;
		dest = (char*)dest + 1;
		sur = (char*)sur + 1;
	}
}

int main()
{
	int arr1[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[10] = { 0 };
	My_memcpy(arr2, arr1, 20);
	for (int i = 0;i < 10;i++)
	{
		printf("%d ", arr2[i]);
	}
	return 0;
}